The invention relates generally to computer system management and, more particularly, to the exchange of information between an operating system and an interrupt processing routine.
In many computer systems, management activities such as those associated with temperature, voltage, and front panel button monitoring are performed by routines that operate transparently to the operating system. Referring to FIG. 1, for example, when a system management event occurs a system management interrupt (SMI) is generated that causes the operating system to transfer control to a SMI handler (block 100). Once invoked, the SMI handler determines what event occurred and takes the appropriate action (block 102). As part of the handler""s operation, it may modify one or more hardware registers and/or system memory locations to indicate the occurrence of the event. Finally, the SMI handler transfers control back to the operating system which restarts (i.e., begins executing) that program/application that was executing at the time the SMI occurred (block 104).
During execution of a SMI handler, neither the operating system or any application executing under it has any knowledge of what system management event occurred or what actions the responding handler has taken. Thus, to obtain information about the occurrence of system management events applications such as LANDesk(copyright) (from Intel Corporation of California) and Unicenter TNG(copyright) (from Computer Associates International of New York) may poll the operating system as shown in FIG. 2. On expiration of an application specific timer (block 200) the system management application initiates a query that, eventually, examines the hardware registers and/or system memory locations that the SMI handler modified (block 202). If the SMI handler modifications indicate a change relevant to the initiating application (the xe2x80x98yesxe2x80x99 prong of diamond 204), this information is returned to the querying application (block 206) and processing continues (block 208). If the SMI handler modifications do not indicate a change relevant to the initiating application (the xe2x80x98noxe2x80x99 prong of diamond 204), normal processing continues (block 208).
Disadvantages of polling techniques include wasted processor time and a lack of event to application-action synchronization. Processor time is wasted every time a polling operation (i.e., acts in accordance with FIG. 2) is performed when a system management event has not occurred. Synchronization between the occurrence of a system management event and an application taking action in response to that event is lost because of the granularity of the associated event timer. In prior art systems, optimization of one of these problems tends to exacerbate the other. For example, to improve synchronization an application""s timer must be very short. This, however, generates more application queries or polling cycles which, in turn, use more processor time. Alternatively, to reduce processor use, an application""s timer may be set to a larger value. A larger timer value, however, adds to the aforementioned synchronization problem. Thus, it would be beneficial to provide techniques to improve system management event processing.
The invention provides a mechanism by which an operating system level application/program is notified of a system management event. The invention conserves computer system processor time by avoiding the use of polling techniques and provides synchronization between the occurrence of a system management event and the detection of that event by the operating system level application.
In one embodiment, the invention provides a method that includes setting a value (while executing in the system management mode) that is visible to the operating system before returning control to the operating system. In one embodiment, the operating system visible value may cause an interrupt service routine to execute. The interrupt service routine may determine various characteristics of the system management event and pass this information to the operating system level application.